using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._PointCloud
{
    /// <summary>
    /// <para>Colorize LAS</para>
    /// <para>Applies colors and near-infrared values from orthographic imagery  to LAS points.</para>
    /// <para>将正交影像中的颜色和近红外值应用于 LAS 点。</para>
    /// </summary>    
    [DisplayName("Colorize LAS")]
    public class ColorizeLas : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ColorizeLas()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// </param>
        /// <param name="_in_image">
        /// <para>Input Image</para>
        /// <para>The image that will be used to assign colors to LAS points.</para>
        /// <para>将用于为 LAS 点指定颜色的图像。</para>
        /// </param>
        /// <param name="_bands">
        /// <para>Band Assignment</para>
        /// <para>The bands from the input image that will be assigned to the color channels associated with the output LAS points.</para>
        /// <para>输入影像中的波段，这些波段将分配给与输出 LAS 点关联的颜色通道。</para>
        /// </param>
        /// <param name="_target_folder">
        /// <para>Target Folder</para>
        /// <para>The existing folder to which the output .las files will be written.</para>
        /// <para>输出 .las 文件将写入到的现有文件夹。</para>
        /// </param>
        public ColorizeLas(object _in_las_dataset, object _in_image, object _bands, object _target_folder)
        {
            this._in_las_dataset = _in_las_dataset;
            this._in_image = _in_image;
            this._bands = _bands;
            this._target_folder = _target_folder;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Colorize LAS";

        public override string CallName => "3d.ColorizeLas";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _in_image, _bands, _target_folder, _name_suffix, _las_version.GetGPValue(), _point_format, _compression.GetGPValue(), _rearrange_points.GetGPValue(), _compute_stats.GetGPValue(), _out_las_dataset, _output_folder];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Input Image</para>
        /// <para>The image that will be used to assign colors to LAS points.</para>
        /// <para>将用于为 LAS 点指定颜色的图像。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Image")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_image { get; set; }


        /// <summary>
        /// <para>Band Assignment</para>
        /// <para>The bands from the input image that will be assigned to the color channels associated with the output LAS points.</para>
        /// <para>输入影像中的波段，这些波段将分配给与输出 LAS 点关联的颜色通道。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Band Assignment")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _bands { get; set; }


        /// <summary>
        /// <para>Target Folder</para>
        /// <para>The existing folder to which the output .las files will be written.</para>
        /// <para>输出 .las 文件将写入到的现有文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_folder { get; set; }


        /// <summary>
        /// <para>Output File Name Suffix</para>
        /// <para>The text that will be appended to the name of each output .las file. Each file will inherit its base name from its source file, followed by the suffix specified in this parameter.</para>
        /// <para>将追加到每个输出 .las 文件的名称的文本。每个文件都将从其源文件继承其基本名称，后跟此参数中指定的后缀。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File Name Suffix")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _name_suffix { get; set; } = null;


        /// <summary>
        /// <para>LAS File Version</para>
        /// <para><xdoc>
        ///   <para>The LAS version of the output files being created.</para>
        ///   <bulletList>
        ///     <bullet_item>LAS 1.2 Files—LAS file version 1.2 will be created.</bullet_item><para/>
        ///     <bullet_item>LAS 1.3 Files—LAS file version 1.3 will be created.</bullet_item><para/>
        ///     <bullet_item>LAS 1.4 Files—LAS file version 1.4 will be created. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>正在创建的输出文件的 LAS 版本。</para>
        ///   <bulletList>
        ///     <bullet_item>LAS 1.2 文件—将创建 LAS 文件版本 1.2。</bullet_item><para/>
        ///     <bullet_item>LAS 1.3 文件—将创建 LAS 文件版本 1.3。</bullet_item><para/>
        ///     <bullet_item>LAS 1.4 文件—将创建 LAS 文件版本 1.4。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("LAS File Version")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _las_version_value _las_version { get; set; } = _las_version_value.value2;

        public enum _las_version_value
        {
            /// <summary>
            /// <para>LAS 1.2 Files</para>
            /// <para>LAS 1.2 Files—LAS file version 1.2 will be created.</para>
            /// <para>LAS 1.2 文件—将创建 LAS 文件版本 1.2。</para>
            /// </summary>
            [Description("LAS 1.2 Files")]
            [GPEnumValue("1.2")]
            value0,

            /// <summary>
            /// <para>LAS 1.3 Files</para>
            /// <para>LAS 1.3 Files—LAS file version 1.3 will be created.</para>
            /// <para>LAS 1.3 文件—将创建 LAS 文件版本 1.3。</para>
            /// </summary>
            [Description("LAS 1.3 Files")]
            [GPEnumValue("1.3")]
            value1,

            /// <summary>
            /// <para>LAS 1.4 Files</para>
            /// <para>LAS 1.4 Files—LAS file version 1.4 will be created. This is the default.</para>
            /// <para>LAS 1.4 文件—将创建 LAS 文件版本 1.4。这是默认设置。</para>
            /// </summary>
            [Description("LAS 1.4 Files")]
            [GPEnumValue("1.4")]
            value2,

        }

        /// <summary>
        /// <para>Point Format</para>
        /// <para><xdoc>
        ///   <para>The point record format of the output LAS files.</para>
        ///   <bulletList>
        ///     <bullet_item>2—Point record format 2.</bullet_item><para/>
        ///     <bullet_item>3—Point record format 3 supports the storage of GPS time.</bullet_item><para/>
        ///     <bullet_item>7—Point record format 7. This is the default value and is only available for LAS version 1.4</bullet_item><para/>
        ///     <bullet_item>8—Point record format 8 supports the storage of near-infrared values. This is only available for LAS version 1.4.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出 LAS 文件的点记录格式。</para>
        ///   <bulletList>
        ///     <bullet_item>2 - 点记录格式 2。</bullet_item><para/>
        ///     <bullet_item>3 - 点记录格式 3 支持存储 GPS 时间。</bullet_item><para/>
        ///     <bullet_item>7 - 点记录格式 7。这是默认值，仅适用于 LAS 版本 1.4</bullet_item><para/>
        ///     <bullet_item>8 - 点记录格式 8 支持存储近红外值。这仅适用于 LAS 版本 1.4。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _point_format { get; set; } = 7;


        /// <summary>
        /// <para>Compression</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output .las file will be in a compressed format or the standard LAS format.</para>
        ///   <bulletList>
        ///     <bullet_item>No Compression—The output will be in the standard LAS format (*.las file). This is the default.</bullet_item><para/>
        ///     <bullet_item>zLAS Compression—Output .las files will be compressed in the zLAS format.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出 .las 文件是压缩格式还是标准 LAS 格式。</para>
        ///   <bulletList>
        ///     <bullet_item>无压缩—输出将采用标准 LAS 格式（*.las 文件）。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>zLAS 压缩—输出 .las 文件将以 zLAS 格式进行压缩。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compression_value _compression { get; set; } = _compression_value._NO_COMPRESSION;

        public enum _compression_value
        {
            /// <summary>
            /// <para>No Compression</para>
            /// <para>No Compression—The output will be in the standard LAS format (*.las file). This is the default.</para>
            /// <para>无压缩—输出将采用标准 LAS 格式（*.las 文件）。这是默认设置。</para>
            /// </summary>
            [Description("No Compression")]
            [GPEnumValue("NO_COMPRESSION")]
            _NO_COMPRESSION,

            /// <summary>
            /// <para>zLAS Compression</para>
            /// <para>zLAS Compression—Output .las files will be compressed in the zLAS format.</para>
            /// <para>zLAS 压缩—输出 .las 文件将以 zLAS 格式进行压缩。</para>
            /// </summary>
            [Description("zLAS Compression")]
            [GPEnumValue("ZLAS")]
            _ZLAS,

        }

        /// <summary>
        /// <para>Rearrange Points</para>
        /// <para><xdoc>
        ///   <para>Specifies whether points in the .las files will be rearranged.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The order of the points in the .las files will not be rearranged.</bullet_item><para/>
        ///     <bullet_item>Checked—The points in the .las files will be rearranged. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否重新排列 .las 文件中的点。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会重新排列 .las 文件中点的顺序。</bullet_item><para/>
        ///     <bullet_item>选中 - 将重新排列 .las 文件中的点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Rearrange Points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _rearrange_points_value _rearrange_points { get; set; } = _rearrange_points_value._true;

        public enum _rearrange_points_value
        {
            /// <summary>
            /// <para>REARRANGE_POINTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REARRANGE_POINTS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_REARRANGE_POINTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_REARRANGE_POINTS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Compute Statistics</para>
        /// <para><xdoc>
        ///   <para>Specifies whether statistics will be computed for the .las files referenced by the LAS dataset. Computing statistics provides a spatial index for each .las file, which improves analysis and display performance. Statistics also enhance the filtering and symbology experience by limiting the display of LAS attributes, such as classification codes and return information, to values that are present in the .las file.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Statistics will be computed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Statistics will not be computed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为 LAS 数据集引用的 .las 文件计算统计数据。计算统计为每个 .las 文件提供空间索引，从而提高分析和显示性能。统计数据还通过将 LAS 属性（如分类代码和返回信息）的显示限制为 .las 文件中存在的值来增强过滤和符号系统体验。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将计算统计数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—不计算统计数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute Statistics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compute_stats_value _compute_stats { get; set; } = _compute_stats_value._true;

        public enum _compute_stats_value
        {
            /// <summary>
            /// <para>COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPUTE_STATS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_COMPUTE_STATS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output LAS Dataset</para>
        /// <para>The output LAS dataset referencing the newly created .las files.</para>
        /// <para>引用新创建的 .las 文件的输出 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_las_dataset { get; set; } = null;


        /// <summary>
        /// <para>Output Folder</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_folder { get; set; }


        public ColorizeLas SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}